#!/bin/sh

if [ $1 = upgrade ]; then
    @MEMO_LAUNCHCTL_PREFIX@/bin/launchctl unload @MEMO_PREFIX@/Library/LaunchDaemons/com.mkj.dropbear.plist
    @MEMO_LAUNCHCTL_PREFIX@/bin/launchctl load @MEMO_PREFIX@/Library/LaunchDaemons/com.mkj.dropbear.plist
fi

if [ $1 = install ]; then
    if [ -f /binpack/Library/LaunchDaemons/dropbear.plist ]; then
			@MEMO_LAUNCHCTL_PREFIX@/bin/launchctl unload /binpack/Library/LaunchDaemons/dropbear.plist
		fi
    @MEMO_LAUNCHCTL_PREFIX@/bin/launchctl load -w @MEMO_PREFIX@/Library/LaunchDaemons/com.mkj.dropbear.plist
fi

exit 0
